import service from "@/utils/request"

import LoginWork from "@/utils/LoginWork"

// 主表明细查询
export const mainQuery = (parms:any) => {
    return service.post<any,any>(`/suppDispatch/suppDispatchHeadQuery`,parms)
}

// 派工明细查询
export const DispatchDetailQuery = (parms:any) => {
    return service.post<any,any>(`/suppDispatch/suppDispatchDetailQuery`,parms)
}

// 人员信息
export const personalInformation = (searchKey:string) => {
    return service.post<any,any>(`/suppDispatch/suppDispatchEmpQuery?searchKey=${searchKey}`)
}

// 补单号回显
export const TheOrderNumberIsDisplayed = (parms:any) => {
    return service.post<any,any>(`/suppDispatch/suppDispatchSlipNoBack`,parms)
}

// 工艺回显
export const ProcessEcho = (slipNo:string,process:string) => {
    return service.post<any,any>(`/suppDispatch/suppDispatchTempProcessBack?slipNo=${slipNo}&process=${process}`)
}

// 号码回显
export const sizeNoEcho = (slipNo:string) => {
    return service.post<any,any>(`/suppDispatch/suppDispatchTempSizeBack?slipNo=${slipNo}`)
}

// 派工单删除
export const deletel = (parms:any) => {
    return LoginWork.put<any,any>(`/suppDispatch/suppDispatchDelete`,parms)
}

// 补单派工明细查询
export const MakeyptheOrder = (parms:any) => {
    return service.post<any,any>(`/suppDispatch/suppDispatchTempQuery`,parms)
}

// 派工新增
export const DispatchAdd = (parms:any) => {
    return LoginWork.put<any,any>(`/suppDispatch/suppDispatchAdd`,parms)
}

// 派工单打印
export const mainQuery1 = (parms:any) => {
    return LoginWork.post<any,any>(`/suppDispatch/suppDispatchPrintQuery`,parms)
}